{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/css/order.css" media="all">
<style>
    .layui-form-item {
        margin-top: 10px !important;
    }

    .layui-form-item {
        margin-bottom: 10px !important;
    }
</style>
<body>
<form action="{:url('save')}" class="layui-form" lay-filter="builderForm"
      data-token=""
      data-nav="会员资料"
      data-just="true"
>
    <input type="hidden" name="id" value="{$info.id}"/>
    <div class="layui-fluid layui-anim layui-anim-downbit" style="padding: 8px 0 !important;">
        <div class="order_box">
            <div class="head">
                <div class="full" style="align-items: center">
                    <img style="width: 60px;" src="{$info.photo}"/>
                    <div class="text">
                        <div class="title">{$info.nickname}</div>
                        <div>注册时间：{$info.create_time}</div>
                        <div style="margin-top: 5px">激活时间：{$info.active_time?:'未激活'}</div>
                    </div>
                    <div>
                        <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"
                                lay-filter="builderFormSubmit" lay-submit>保存
                        </button>
                    </div>
                </div>
            </div>

            <div class="layui-tab " lay-filter="user-info">
                <ul class="layui-tab-title">
                    <li class="layui-this">用户信息</li>
                    <li>收款方式</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="title">基本信息</div>
                                <div class="layui-row" style="padding-top: 10px">

                                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md6">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label req">会员编号：</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.code}" class="layui-input" disabled/>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md6">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label req">会员昵称：</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="nickname" value="{$info.nickname}"
                                                       class="layui-input"/>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md6">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label req">推荐人：</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.parent_code??''}" class="layui-input"
                                                       disabled/>
                                            </div>
                                        </div>
                                    </div>


                                    <?php echo builderFormInit([
                                        'title' => '会员级别',
                                        'name' => 'level_id',
                                        'options' => array_merge([0=>'暂无'],\app\common\model\Level::column('title','id')),
                                        'value' => $info->level_id
                                    ])->getFormItemSelectHtml('level_id');?>

                                </div>
                            </div>
                        </div>
                        <div class="tabs-tab-pane">
                            <div class="section">
                                <div class="title">用户设置</div>
                                <div class="layui-row" style="padding-top: 10px">
                                    {:builderFormInit([
                                    'title' => '账号锁定',
                                    'name' => 'is_lock',
                                    'options' => [0=>'关闭',1=>'开启'],
                                    'value'=>$info.is_lock,
                                    'remark' => '开启后，此会员将无法登陆系统'
                                    ])->getFormItemCheckboxHtml('radio')}

                                </div>
                            </div>
                        </div>
                    </div>


                    <div class="layui-tab-item">
                        <div class="tabs-tab-pane">

                            <div class="section">

                                <div class="layui-row" style="padding-top: 10px">

                                    <?php echo builderFormInit([
                                        'title' => '银行名称',
                                        'name' => 'bank_name',
                                        'options' => array_merge([0=>'暂无'],\app\common\model\Bank::column('title','id')),
                                        'value' => $info->bank_name
                                    ])->getFormItemSelectHtml('level_id');?>

                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6 ">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label approve_account">开户行</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.bank_open}"
                                                       class="layui-input" autocomplete="off" name="bank_open"
                                                       placeholder="未填写">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6 ">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label approve_account">银行户名</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.bank_account_name}"
                                                       class="layui-input" autocomplete="off" name="bank_account_name"
                                                       placeholder="未填写">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6 ">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label approve_account">银行卡号</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.bank_number}"
                                                       class="layui-input" autocomplete="off" name="bank_number"
                                                       placeholder="未填写">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6 ">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label approve_account">微信真实姓名</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.wechat_name}"
                                                       class="layui-input" autocomplete="off" name="wechat_name"
                                                       placeholder="未填写">
                                            </div>
                                        </div>
                                    </div>
                                    {:builderFormInit([ 'title' => '微信收款码', 'name' => 'wechat_image', 'value' =>
                                    !empty($info) ? $info->wechat_image : '', ])->getFormItemImgHtml(1)}

                                    <div class="layui-col-xs12 layui-col-sm12 layui-col-md6 ">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label approve_account">支付宝真实姓名</label>
                                            <div class="layui-input-block">
                                                <input type="text" value="{$info.alipay_name}"
                                                       class="layui-input" autocomplete="off" name="alipay_name"
                                                       placeholder="未填写">
                                            </div>
                                        </div>
                                    </div>

                                    {:builderFormInit(['title' => '支付宝收款码', 'name' => 'alipay_image', 'value' =>
                                    !empty($info) ? $info->alipay_image : ''])->getFormItemImgHtml(1)}

                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </div>
</form>

</body>
{include file="public/footer" /}

<script>
    layui.use(['edit'], function () {
        layui.edit.render();
    });
</script>
</html>